import { createRouter, createWebHistory } from 'vue-router'
import type  {RouteRecordRaw} from 'vue-router'
export const Routers:RouteRecordRaw[]=[
  {
    path:"/",
    meta:{
      title:"首页"
    },
    component:()=>import("@/views/index/index.vue")
  },
  {
    path:"/list/each",
    meta:{
      title:"图表"
    },
    component:()=>import("@/views/each/index.vue")
  },
  {
    path:"/list/user",
    meta:{
      title:"用户管理"
    },
    component:()=>import("@/views/useMes/index.vue")
  },
  {
    path:"/list/set",
    meta:{
      title:"设置"
    },
    component:()=>import("@/views/set/index.vue")
  }
]
 const routes:RouteRecordRaw[]=[
  {
    path:"/",
    meta:{
      title:"布局"
    },
    component:()=>import("@/views/layout/index.vue"),
    children:Routers
  },
  {
    path:"/login",
    meta:{
      title:"登录"
    },
    component:()=>import("@/views/login/index.vue")
  }
]
const router= createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: routes
})
export default router